let mongoose = require('mongoose')

mongoose.connect('mongodb+srv://3072320492:jsw123456@cluster0.c5qcvl3.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0/peta_doptionDB')

let conn = mongoose.connection

conn.on('open', () => {
    console.log('数据库连接成功');
})

conn.on('error', () => {
    console.log('数据库连接失败');
})

module.exports = mongoose